/*
 * @Description:
 * @Version: 1.0
 * @Autor: haozhuang
 * @Date: 2020-04-28 14:34:17
 * @LastEditors: haozhuang
 * @LastEditTime: 2020-05-07 17:34:44
 */
import Mock from 'mockjs'

const data = Mock.mock({
  'data|30': [
    {
      id: '@id',
      name: '@csentence(4,6)',
      isActive: false
    }
  ]
})

const data2 = Mock.mock({
  'data|30': [
    {
      id: '@id',
      name: '@csentence(4,6)',
      isSee: false,
      isDelete: false,
      ismodify: false
    }
  ]
})
const data3 = Mock.mock({
  'data|30': [
    {
      id: '@id',
      name: '@cname()',
      isSee: true,
      isDelete: false,
      ismodify: false
    }
  ]
})

export default [
  {
    url: '/vue-admin-template/role/list',
    type: 'get',
    response: config => {
      const items = data.data
      return {
        code: 20000,
        data: {
          total: items.length,
          data: items
        }
      }
    }
  },
  {
    url: '/vue-admin-template/authorization/list',
    type: 'get',
    response: config => {
      const items = data2.data
      return {
        code: 20000,
        data: {
          total: items.length,
          data: items
        }
      }
    }
  },
  {
    url: '/vue-admin-template/user/list',
    type: 'get',
    response: config => {
      const items = data3.data
      return {
        code: 20000,
        data: {
          total: items.length,
          data: items
        }
      }
    }
  }
]
